home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Format 1996 April
/
MacFormat CD Edition MF36 (April 1996).iso
/
Shareware City
/
Developers
/
Tools Plus - GUI⁄Event libs
/
Tools Plus 2.6.1a Evaluat'n Kit
/
Tools Plus 2.6.1a
/
Tools Plus for Symantec C⁄C++
/
ToolsPlus.h
< prev
next >
Wrap
Text File
|
1995-08-01
|
63KB
|
1,243 lines
/* Tools Plus (Version 2.6.1) header file for Symantec (THINK) C/C++
* Copyright (C) 1989-95 Water’s Edge Software
*
* This header file defines all Tools Plus components (constants, variables and
* structures). Programs using Tools Plus must include this header file.
*/
#ifndef __ToolsPlus__
#define __ToolsPlus__
#define UseColor true /* INITIALIZATION: Use color if available */
#define IgnoreColor false /* Don't use color */
#define doNothing 0 /* POLLING: no event */
#define doChgWindow 1 /* user clicked in an inactive window */
#define doRefresh 2 /* a window has to be refreshed */
#define doGoAway 3 /* the close box was clicked */
#define doButton 4 /* button was clicked */
#define doMenu 5 /* menu was selected */
#define doKeyDown 6 /* a keyboard key was pressed */
#define doAutoKey 7 /* a keyboard key is auto-repeating */
#define doKeyUp 8 /* a keyboard key was released */
#define doClickField 9 /* mouse clicked in inactive field */
#define doScrollBar 10 /* mouse clicked in a scroll bar */
#define doListBox 11 /* some sort of List Box activity */
#define doClick 12 /* mouse click/drag [1..3] */
#define doPopUpMenu 13 /* pop-up menu was selected */
#define doPictButton 14 /* picture button activity */
#define doClickControl 101 /* mouse clicked in a custom control */
#define doManualEvent 102 /* manually processed events */
#define doMoveWindow 103 /* a window was dragged by user */
#define doGrowWindow 104 /* a window was "grown" by user */
#define doClickDesk 105 /* mouse clicked in the desk top */
#define doZoomWindow 106 /* zoom box was clicked by user */
#define doSuspend 107 /* appl. suspended (in background) */
#define doResume 108 /* appl. resumed (now active appl.) */
#define doChgInField 109 /* editing field contents was changed */
#define doPreRefresh 110 /* refresh window before T+ objects */
#define inUpButton 20 /* Parts of Scroll Bar: Up button */
#define inDownButton 21 /* Down button */
#define inPageUp 22 /* Page Up area */
#define inPageDown 23 /* Page Down area */
#define inThumb 129 /* Thumb */
#define inClick1 1 /* CLICK: mouse single-click completed */
#define inClick2 2 /* mouse double-click completed */
#define inClick3 3 /* mouse triple-click completed */
#define inClick1Drag -1 /* mouse single-click, still dragging */
#define inClick2Drag -2 /* mouse double-click, still dragging */
#define inClick3Drag -3 /* mouse triple-click, still dragging */
#define EnterKey (char)0x03 /* KEYS: Key characters (ASCII) for the most */
#define BackSpaceKey (char)0x08 /* commonly encountered keys. In */
#define TabKey (char)0x09 /* some cases, several keys produce */
#define ReturnKey (char)0x0D /* the same ASCII character. They */
#define EscClearKey (char)0x1B /* (0x1B) may be differentiated by using */
#define LeftArrowKey (char)0x1C /* the key code, as indicated below. */
#define RightArrowKey (char)0x1D /* Some keys are available only on */
#define UpArrowKey (char)0x1E /* an "extended" keyboard. */
#define DownArrowKey (char)0x1F /* */
#define HelpKey (char)0x05 /* */
#define HomeKey (char)0x01 /* */
#define DeleteFwdKey (char)0x7F /* */
#define EndKey (char)0x04 /* */
#define PageUpKey (char)0x0B /* */
#define PageDownKey (char)0x0C /* */
#define FKey (char)0x10 /* (0x10) Function keys "F1" to "F15" */
#define EscKeyCode 0x35 /* (0x1B) KEY CODES used to differentiate */
#define ClearKeyCode 0x47 /* (0x1B) between keys which produce the */
#define F1KeyCode 0x7A /* (0x10) same key characters. */
#define F2KeyCode 0x78 /* */
#define F3KeyCode 0x63 /* */
#define F4KeyCode 0x76 /* */
#define F5KeyCode 0x60 /* */
#define F6KeyCode 0x61 /* */
#define F7KeyCode 0x62 /* */
#define F8KeyCode 0x64 /* */
#define F9KeyCode 0x65 /* */
#define F10KeyCode 0x6D /* */
#define F11KeyCode 0x67 /* */
#define F12KeyCode 0x6F /* */
#define F13KeyCode 0x69 /* */
#define F14KeyCode 0x6B /* */
#define F15KeyCode 0x71 /* */
#define mDividingLine "\p-" /* MENUS: Dividing line */
#define AppleChar (char)0x14 /* MENU CHARS: Apple character */
#define CheckChar (char)0x12 /* Check Mark character */
#define DiamondChar (char)0x13 /* Diamond character */
#define DotChar (char)0xA5 /* Dot (or bullet) character */
#define NoChar (char)0x00 /* no character */
/* PICTURE BUTTONS: */
#define picbutInstantEvent 0x80000000/* Report event on mouse-down */
#define picbutTrackWithHilite 0x40000000/* Track using hiliting, like radio button */
#define picbutLockSelected 0x20000000/* Lock if selected (mouse can't deselect) */
#define picbutSwitchSelected 0x10000000/* Switch 'selected' state if clicked */
#define picbutRepeatEvents 0x08000000/* Repeat event when button is held down */
#define picbutAutoValueChg 0x04000000/* Automatically change button's value */
#define picbutScaleLinear 0x00000000/* Rate of automatic value change… */
#define picbutScaleSlowAccel 0x01000000/* Linear, Slow Acceleration, */
#define picbutScaleMedAccel 0x02000000/* Medium Acceleration, and */
#define picbutScaleFastAccel 0x03000000/* Fast Acceleration. */
#define picbutLinear 0x0 /* Linear (use in structure) */
#define picbutSlowAccel 0x1 /* Slow (use in structure) */
#define picbutMedAccel 0x2 /* Medium (use in structure) */
#define picbutFastAccel 0x3 /* Fast (use in structure) */
#define picbutValueWrap 0x00800000/* Button's range of values 'wrap' around */
#define picbutLeftRightSplit 0x00400000/* Left side reduces value, right increases*/
#define picbutTopBottomSplit 0x00200000/* Top increases value, bottom reduces */
#define picbutMultiStage 0x00100000/* Button has multiple stages */
#define picbutBigSICN3D 0x00080000/* Create a larger SICN 3D button */
#define picbutUsePICTS 0x00040000/* Use PICTs instead of icons */
#define picbutGray4use8 0x00020000/* Use 8-bit color pict on 4-bit gray CRT */
/* Selection Effects… */
#define picbutSelectDarken 0x00010000/* Darken image */
#define picbutSelectDarkenSICN3D 0x00008000/* Darken (and push in) a 3D SICN icon */
#define picbutSelectLightenSICN3D 0x00004000/* Lighten (and push in) a 3D SICN icon */
#define picbutSelectPushedSICN3D 0x00002000/* Same color (and push in) a 3D SICN icon */
#define picbutSelectAltImage 0x00000400/* Use an alternate image */
/*Disabling Effects… */
#define picbutDimUsingBlackLite 0x00000100/* Overlay Black color using Lt Gray pat. */
#define picbutDimUsingWhiteLite 0x00000080/* Overlay White color using Lt Gray pat. */
#define picbutDimUsingWhite 0x00000040/* Overlay White color using Gray pat. */
#define picbutDimLeaveBorder 0x00000008/* Leave border when applying effect */
#define picbutDimAltImage 0x00000004/* Use an alternate image */
#define picbutDimNoChange 0x00000002/* Button looks the same when disabled */
/* POP-UP MENUS: */
#define popupNeverDimOutline 0x0100 /* Never dim the control's outline? */
#define popupNeverDimSelection 0x0080 /* Never dim the selected item's text? */
#define popupNeverDimTitle 0x0040 /* Never dim the title? */
#define popupNoArrow 0x0020 /* Is the "down arrow" hidden? */
#define popupMultiSelect 0x0010 /* Allow multiple items to be selected? */
#define popupUseWFont 0x0008 /* Use the window's font for the menu? */
#define popupIconTitle 0x0004 /* Draw icon in the control's title? */
#define popupFixedTitle 0x0002 /* Is fixed title displayed in the control?*/
#define popupDefaultType 0x0000 /* Default menu (sys font, 1 item, no icon)*/
#define arrowCursor 0 /* CURSORS: "arrow" cursor */
#define GoAway true /* WINDOWS: no "close box" */
#define NoGoAway false /* window has a "close box" */
#define Modal true /* window is "modal" */
#define NotModal false /* window is not "modal */
#define ZoomBox 8 /* zoom box (add to procID) */
#define wCenter 0x00010000 /* auto-centering (add to procID) */
#define wTile 0x00020000 /* auto-tiling (add to procID) */
#define wPalette 0x80000000 /* palette behavior (add to procID) */
#define ordPaletteProc 32000 /* window that looks like Palette */
#define paletteProc 32000 + wPalette/* T+’s Floating Palette window */
#define altPaletteProc 32002 + wPalette/* T+’s palette with drag bar on left */
#define wNoKind 0 /* Kinds of Windows: Not open */
#define wToolBarKind 1 /* Tool Bar */
#define wFloatingKind 2 /* Floating Palette */
#define wStandardKind 3 /* Standard Window */
#define wAnimateMove 0x01 /* Moving Windows: Animate w/Zoom Lines */
#define wOffsetForToolBar 0x02 /* Offset co-ords for TB */
#define wShow true /* Hiding Windows: Display (unhide) */
#define wHide false /* Hide window */
#define tbShiftWindows 0x01 /*TOOL BAR: Shift windows when TB opens */
#define tbOffsetNewWindows 0x02 /* Offset new windows as they are */
/* opened (if Tool Bar is open). */
#define DefaultButton 4 /* BUTTONS: "default" for the window */
#define selected true /* button is selected (ie: checked) */
#define notSelected false /* button is not selected */
#define useWFont 8 /* use parent window's font */
#define scrlLeftEdge -1 /* SCROLL BARS: left edge of document */
#define scrlTopEdge -1 /* top edge of document */
#define scrlRightEdge 32767 /* right edge of document */
#define scrlBottomEdge 32767 /* bottom edge of document */
/* LIST BOXES: */
#define lOnlyOne -128 /* Prohibit multiple selections */
#define lExtendDrag 64 /* Drag extends without shift key */
#define lNoDisjoint 32 /* Click deselects previsous selections */
#define lNoExtend 16 /* Shift won't extend selection */
#define lNoRect 8 /* Don't expand selection as a rectangle */
#define lUseSense 4 /* Shift senses state of initial line */
/* BUTTONS, MENUS, SCROLL BARS & ICONS: */
#define enabled true /* enabled (active) */
#define disabled false /* disabled (dim, inactive) */
#define teBoxNoCR 0 /* EDIT FIELDS: box around field, no CR allowed */
#define teBoxCR 1 /* box around field, CR allowed */
#define teNoBoxNoCR 2 /* no box, no CR allowed */
#define teNoBoxCR 3 /* no box, CR allowed */
#define teJustLeft 0 /* text is left aligned */
#define teJustCenter 1 /* text is centered */
#define teJustRight -1 /* text is right aligned */
#define teSelectAll 0 /* EDIT FIELD SELECTION: all of text */
#define teSelectStart 1 /* beginning of text */
#define teSelectEnd 2 /* end of text */
#define teReplace true /* PASTE INTO FIELD: replace field contents */
#define teInsert false /* insert text into field */
#define OkAltBut 1 /* ALERTS: OK (Buttons) */
#define CanAltBut 2 /* Cancel */
#define YesAltBut 3 /* Yes */
#define NoAltBut 4 /* No */
#define ContAltBut 5 /* Continue */
#define SkipAltBut 6 /* Skip */
#define QuitAltBut 7 /* Quit */
#define NoButtonAlert 0 /* No buttons (Combinations) */
#define OkAlert 11100 /* OK (default) */
#define CanAlert 11200 /* Cancel (default) */
#define OkCanAlert 22210 /* OK (default) + Cancel */
#define CanOkAlert 21210 /* OK + Cancel (default) */
#define YesNoAlert 22430 /* Yes (default) + No */
#define NoYesAlert 21430 /* Yes + No (default) */
#define YesNoCanAlert 33243 /* Yes (default) + No + Cancel */
#define NoYesCanAlert 32243 /* Yes + No (default) + Cancel */
#define nmSysBeep -1 /* NOTIFICATION: Use System Error sound */
#define nmSilentNote 0 /* Silent notification */
#define nmDefaultMsg "\p " /* Use default message */
#define nmNoMsg "\p" /* Don't display an alert */
#define nmResetWhenDone true /* Reset to defaults after used */
#define nmKeepSettings false /* Keep settings after used */
#define NoIcon -32768 /* ICONS: No icon used */
#define stopIcon 0 /* Stop icon */
#define noteIcon 1 /* Note icon */
#define cautionIcon 2 /* Caution icon */
/* Disabled icons' default appearance… */
#define DfltIconDimBlackLtPat 0x01 /* Overlay Black color w/ Lt Gray pattern */
#define DfltIconDimWhiteLtPat 0x02 /* Overlay White color w/ Lt Gray pattern */
#define DfltIconDimWhitePat 0x04 /* Overlay White color w/ Gray pattern */
#define DfltIconLeaveBorder 0x20 /* Leave border when selected or disabled */
#define DfltIconUpdateNow 0x8000 /* Update all windows with changes */
#define on true /* MISCELLANEOUS: */
#define off false /* */
#define maxNullTime 0x7FFFFFFF /* Infinite time between doNothing evts*/
#define ZoomAcross 0 /* ZOOM LINES: transitional */
#define ZoomIn -1 /* zoom inward (further away) */
#define ZoomOut 1 /* zoom outward (nearer) */
#define none 0 /* used primarily for polling */
/* - - - - - - These record "types" are used for information transfer between - - - - - - - */
/* your application and Tools Plus libraries. */
/*= Polling record's "event modifiers" info*/
union TPModifiersRec { /*This variable record contains an event's */
/* "modifiers" in 2 formats… */
/* • Macintosh Event: */
short Num; /* short (bit operations required) */
struct { /* • Modifier short parsed into components: */
unsigned short bit15 :1; /* (reserved bit) */
unsigned short bit14 :1; /* (reserved bit) */
unsigned short bit13 :1; /* (reserved bit) */
unsigned short ControlKey :1; /* Control key was down at event (=1) */
unsigned short OptionKey :1; /* Option key was down at event (=1) */
unsigned short CapsLock :1; /* Caps Lock was down at event (=1) */
unsigned short ShiftKey :1; /* Shift key was down at event (=1) */
unsigned short CmdKey :1; /* Command key was down at event (=1) */
unsigned short MouseUp :1; /* Mouse button was UP at event (=1) */
unsigned short bit6 :1; /* (reserved bit) */
unsigned short bit5 :1; /* (reserved bit) */
unsigned short bit4 :1; /* (reserved bit) */
unsigned short bit3 :1; /* (reserved bit) */
unsigned short bit2 :1; /* (reserved bit) */
unsigned short bit1 :1; /* (reserved bit) */
unsigned short bit0 :1; /* (reserved bit) */
} Bits; /* */
};
typedef union TPModifiersRec TPModifiersRec;
/*= Polling record's "button" info*/
struct TPPollButtonRec {
short Num; /*Button number */
Boolean DoubleClick; /*Did a double-click occur? */
};
typedef struct TPPollButtonRec TPPollButtonRec;
/*= Polling record's "scroll bar" info*/
struct TPPollScrollBarRec {
short Num; /*Scroll bar number */
short Part; /*Scroll bar's part */
};
typedef struct TPPollScrollBarRec TPPollScrollBarRec;
/*= Polling record's "list box" info*/
struct TPPollListBoxRec {
short Num; /*List box number */
Boolean DoubleClick; /*Did a double-click occur? */
};
typedef struct TPPollListBoxRec TPPollListBoxRec;
/*= Polling record's "menu" info*/
struct TPPollMenuRec {
short Num; /*Menu number */
short Item; /*Menu item number */
};
typedef struct TPPollMenuRec TPPollMenuRec;
/*= Polling record's "key-stroke" info*/
struct TPPollKeyRec {
short Code; /*Logical key number of the typed key */
char Chr; /*ASCII character generated by typed key */
Byte Unused; /* (reserved byte) */
};
typedef struct TPPollKeyRec TPPollKeyRec;
/*= Polling record's "mouse location and time" info for mouse-down and mouse-up events*/
struct TPPollMousePointRec {
Point Where; /*Event location in local co-ordinates */
long When; /*Event time in clock ticks from boot (1/60 sec)*/
TPModifiersRec Modifiers; /*Event modifiers */
};
typedef struct TPPollMousePointRec TPPollMousePointRec;
/*= Polling record's "mouse click/drag" info*/
struct TPPollMouseRec {
short What; /*What type of mouse event? (click or drag) */
TPPollMousePointRec Down[3]; /*Where & when did the mouse-down occur */
TPPollMousePointRec Up[3]; /*Where & when did the mouse-up occur */
Point Where; /*Current mouse location in local co-ordinates */
};
typedef struct TPPollMouseRec TPPollMouseRec;
/*= POLLING record for Tools Plus*/
struct TPPollRecord { /*Tools Plus Polling record… */
short What; /*What type of event has occurred? */
short Window; /*Window number of the event */
TPPollButtonRec Button; /*Button number/double-click status */
TPPollScrollBarRec ScrollBar; /*Scroll bar number/scroll bar part */
short Field; /*Field number of event */
TPPollListBoxRec ListBox; /*List box number/double-click status */
TPPollMenuRec Menu; /*Menu number/menu item of an event */
TPPollKeyRec Key; /*Logical key number & character of typed key */
TPPollMouseRec Mouse; /*Click/drag info: [1..3] where & when */
TPModifiersRec Modifiers; /*Modifier flags */
EventRecord Event; /*Macintosh Toolbox Event (raw) */
};
typedef struct TPPollRecord TPPollRecord;
typedef TPPollRecord *TPPollPointer; /*Pointer to a Polling record */
/*= WINDOW status information*/
struct TPWindowStatus {
short Kind; /*Window kind: Tool Bar, Palette, or Standard */
Boolean Open; /*Is the window open? */
Boolean Visible; /*Is this window visible (not hidden)? */
Boolean Active; /*Is this window active? */
Boolean Front; /*Is this the frontmost Tools Plus window? */
Boolean Current; /*Is this the current window? */
Boolean WorkWindow; /*Is this the work window? */
Boolean EditFieldWindow; /*Does this window have app's active field? */
short ActiveField; /*Window's active field number */
Rect StrucRect; /*Structure rect (global). Incl border&title bar*/
Rect ContRect; /*Content rect (global). Working area only. */
};
typedef struct TPWindowStatus TPWindowStatus;
/*= Color Pen information*/
struct ColorPenState { /*Color equivalent for a 'PenState' record. */
PenState PenState; /* This record also stores additional values */
RGBColor ForegroundColor; /* for the window's foreground and background */
RGBColor BackgroundColor; /* colors. */
};
typedef struct ColorPenState ColorPenState;
/*= Picture Button Appearance & Behavior Specification (or you can use constants instead) */
union TPPictButtonSpec { /*Picture Button's appearance and */
/* behavior specs in 2 formats… */
struct{ /* • Parsed into components: */
unsigned short InstantEvent: 1; /* Report event on mouse-down */
unsigned short TrackWithHilite: 1; /* Track using hiliting (like a */
/* radio button) */
unsigned short LockSelected: 1; /* Lock if selected (mouse can't */
/* deselect) */
unsigned short SwitchSelected: 1; /* Switch 'select' state if clicked*/
unsigned short RepeatEvents: 1; /* Repeat event when button is held*/
unsigned short AutoValueChg: 1; /* Automatically chg button's value*/
unsigned short AutoValueScaling: 3; /* Rate of chg for button's value */
unsigned short ValueWrap: 1; /* Button's range of values 'wrap' */
/* around. */
unsigned short LeftRightSplit: 1; /* Left side reduces value, right */
/* increases. */
unsigned short TopBottomSplit: 1; /* Top increases value, bottom */
/* reduces. */
unsigned short MultiStage: 1; /* Button has multiple stages */
unsigned short BigSICN3D: 1; /* Create a larger SICN 3D button */
unsigned short UsePICTS: 1; /* Use PICTs instead of icons */
unsigned short Gray4use8: 1; /* Use 8-bit color pict on 4-bit */
/* gray monitor. */
/* Selection Effects… */
unsigned short SelectDarken: 1; /* Darken image */
unsigned short SelectDarkenSICN3D: 1; /* Darken (+push in) a 3D SICN icon*/
unsigned short SelectLightenSICN3D: 1; /* Lighten (+push in) 3D SICN icon */
unsigned short SelectPushedSICN3D: 1; /* Same color (+push) 3D SICN icon */
unsigned short bit19: 1; /* (reserved bit) */
unsigned short bit20: 1; /* (reserved bit) */
unsigned short SelectAltImage: 1; /* Use an alternate image */
unsigned short bit22: 1; /* (reserved bit) */
/* Disabling Effects… */
unsigned short DimUsingBlackLite: 1; /* Overlay Black color, Lt Gray pat*/
unsigned short DimUsingWhiteLite: 1; /* Overlay White color, Lt Gray pat*/
unsigned short DimUsingWhite: 1; /* Overlay White color, Gray pat. */
unsigned short bit26: 1; /* (reserved bit) */
unsigned short bit27: 1; /* (reserved bit) */
unsigned short DimLeaveBorder: 1; /* Leave border when effect applied*/
unsigned short DimAltImage: 1; /* Use an alternate image */
unsigned short DimNoChange: 1; /* Button looks same when disabled */
unsigned short bit31: 1; /* (reserved bit) */
} Bits; /* */
long Num; /* • Long equivalent */
}; /* */
typedef union TPPictButtonSpec TPPictButtonSpec;
/*= Pop-Up Menu Appearance & Behavior Specification (or you can use constants instead) */
union TPPopUpMenuSpec { /*Pop-Up Menu's appearance and behavior */
/* specifications in 2 formats… */
struct{ /* • Parsed into components: */
unsigned short bit15 :1; /* (reserved bit) */
unsigned short bit14 :1; /* (reserved bit) */
unsigned short bit13 :1; /* (reserved bit) */
unsigned short bit12 :1; /* (reserved bit) */
unsigned short bit11 :1; /* (reserved bit) */
unsigned short bit10 :1; /* (reserved bit) */
unsigned short bit9 :1; /* (reserved bit) */
unsigned short NeverDimOutline :1; /* Never dim the control's outline? */
unsigned short NeverDimSelectedItem: 1; /* Never dim the selected item's text?*/
unsigned short NeverDimTitle: 1; /* Never dim the title? */
unsigned short NoArrow: 1; /* Is the "down arrow" hidden? */
unsigned short MultipleSelections: 1; /* Allow multiple items to be selected*/
unsigned short UseWindowFont: 1; /* Display using window's font? */
unsigned short IconInTitle: 1; /* Draw icon in the control's title? */
unsigned short FixedTitle: 1; /* Display fixed title in the control?*/
unsigned short bit0 :1; /* (reserved bit) */
} Bits; /* */
short Num; /* • Short equivalent */
}; /* */
typedef union TPPopUpMenuSpec TPPopUpMenuSpec;
#ifdef __cplusplus
extern "C" {
#endif
/*======================================== I N I T I A L I Z A T I O N ======================================== */
/*Initialize Tools Plus*/
pascal Boolean InitToolsPlus (short MoreHandles, /*Number of MoreMasters initializing cycles */
short MaxWindows, /*Maximum number of windows required */
Boolean UseColorFlag /*Should Color QuickDraw be used if available? */
); /* = Was initialization successful? */
/*=============================================== W I N D O W S =============================================== */
/*Open a window and make it current*/
pascal void WindowOpen (short Window, /*Window number */
short left, /*Window's co-ordinates (global) */
short top, /* */
short right, /* */
short bottom, /* */
Str255 Title, /*Window's title (if applicable) */
long procID, /*Window definition ID */
Boolean goAwayFlag, /*Include Close Box? */
Boolean modalFlag); /*Is window modal? */
/*Open a window and make it current (co-ordinates specified as a 'rect') */
pascal void WindowOpenRect (short Window, /*Window number */
const Rect *Bounds, /*Window's co-ordinates (global) */
Str255 Title, /*Window's title (if applicable) */
long procID, /*Window definition ID */
Boolean goAwayFlag, /*Include Close Box? */
Boolean modalFlag); /*Is window modal? */
/*Open the tool bar and make it current*/
pascal void ToolBarOpen (short Window, /*Window number */
short Height, /*Tool bar height */
short procID); /*Appearance/behavior specifications */
/*Close a window*/
pascal void WindowClose (short Window); /*Window number */
/*Change a window's size*/
pascal void WindowSize (short Window, /*Window number */
short Width, /*Window's new width */
short Height, /*Window's new height */
Boolean Update); /*Force doRefresh event for newly exposed rgn? */
/*Move a window to the specified co-ordinates*/
pascal void WindowMove (short Window, /*Window number */
short hGlobal, /*Horizontal co-ordinates (global) */
short vGlobal, /*Vertical co-ordinates (global) */
short procID); /*Behavior specifications */
/*Hide or show a window*/
pascal void WindowDisplay (short Window, /*Window number */
Boolean Show); /*Should the window be shown? */
/*Make a specified window the "active" and "current" window*/
pascal void ActivateWindow (short Window); /*Window number */
/*Set a window's title*/
pascal void WindowTitle (short Window, /*Window number */
Str255 Title); /*Window's title (if applicable) */
/*Set the current window's "growing" limits (ie: maximum/minimum size) */
pascal void SetWindowSizeLimits (short minHoriz, /*Window's size limits in pixels */
short minVert, /* */
short maxHoriz, /* */
short MaxVert); /* */
/*Set the current window's standard co-ordinates and user co-ordinates for "zooming"*/
pascal void SetWindowZoom (const Rect *userRect, const Rect *stdRect); /*User & standard co-ords (global) */
/*Get the current window's user co-ordinates & standard co-ordinates for "zooming"*/
pascal void GetWindowZoom (Rect *userRect, Rect *stdRect); /*User & standard co-ordinates (global) */
/*Make a specified window "current", but do not activate it*/
pascal void CurrentWindow (short Window); /*Window number */
/*Make the "active" window the "current"*/
pascal void CurrentWindowReset(void);
/*Get a window's status*/
pascal void WindowStatus (short Window, /*Window number */
TPWindowStatus *Status); /*Window's status record */
/*Get the active window number (last used window if Tool Bar and/or Floating Palettes are open) */
pascal short ActiveWindowNumber(void); /*Window number of active window */
/*Get the current window number*/
pascal short CurrentWindowNumber(void); /*Window number of current window */
/*Get the front most window number*/
pascal short FirstWindowNumber(void); /*Window number of front most window */
/*Get the Tool Bar's window number*/
pascal short ToolBarNumber(void); /*Tool Bar's window number */
/*Get the first floating Palette's window number*/
pascal short FirstPaletteNumber(void); /*Front most floating Palette's window number */
/*Get the first standard window's number (not Tool Bar or Floating Palette).*/
pascal short FirstStdWindowNumber(void); /*Front most standard window's number */
/*Get the working window number*/
pascal short WorkWindowNumber(void); /*Working window number */
/*Get the window number that contains the active editing field*/
pascal short EditFldWindowNumber(void); /*Window number containing active editing field */
/*Determine if a window is open*/
pascal Boolean WindowIsOpen (short Window /*Window number */
); /* = Is the window open? */
/*Determine if a window is visible (open and not hidden)*/
pascal Boolean WindowIsVisible (short Window /*Window number */
); /* = Is the window visible? */
/*Determine the type of window*/
pascal short WindowKind (short Window /*Window number */
); /* = Kind of window */
/*Get a window's "window pointer" */
pascal WindowPtr WindowPointer (short Window /*Window number */
); /* = Window's pointer */
/*=============================================== B U T T O N S =============================================== */
/*Create a new button*/
pascal void NewButton (short Button, /*Button number */
short left, /*Button's co-ordinates (local) */
short top, /* */
short right, /* */
short bottom, /* */
Str255 Title, /*Button's title */
short procID, /*Button's definition ID */
Boolean EnabledFlag, /*Enable the button? */
Boolean SelectedFlag); /*Select the button? */
/*Create a new button (co-ordinates specified as a 'rect') */
pascal void NewButtonRect (short Button, /*Button number */
const Rect *Bounds, /*Button's co-ordinates (local) */
Str255 Title, /*Button's title */
short procID, /*Button's definition ID */
Boolean EnabledFlag, /*Enable the button? */
Boolean SelectedFlag); /*Select the button? */
/*Delete a button*/
pascal void DeleteButton (short Button); /*Button number */
/*Enable/disable a button*/
pascal void EnableButton (short Button, /*Button number */
Boolean EnabledFlag); /*Enable the button? */
/*Select/deselect a button*/
pascal void SelectButton (short Button, /*Button number */
Boolean SelectedFlag); /*Select the button? */
/*Determine if a button is enabled*/
pascal Boolean ButtonIsEnabled (short Button /*Button number */
); /* = Is the button enabled? */
/*Determine if a button is selected*/
pascal Boolean ButtonIsSelected (short Button /*Button number */
); /* = Is the button selected? */
/*Set a button's title*/
pascal void ButtonTitle (short Button, /*Button number */
Str255 Title); /*Button's title */
/*Make a button the window's default button*/
pascal void SetDefaultButton (short Button); /*Button number */
/*Remove the "default button status" from the window's default button*/
pascal void NoDefaultButton(void);
/*"Flash" a push button as though it were pressed by the user*/
pascal void FlashButton (short Button); /*Button number */
/*======================================= P I C T U R E B U T T O N S ====================================== */
/*Create a new Picture Button*/
pascal void NewPictButton (short Button, /*Picture button number */
short left, /*Button's top-left corner in window's local */
short top, /* co-ordinates. */
short BaseID, /*Base image's ID number */
long procID, /*Appearance and Behavior specifications */
Boolean EnabledFlag, /*"Button is enabled" flag */
Boolean SelectedFlag, /*"Button is selected" flag */
short minimum, /*Minimum limit of button's value */
short value, /*Button's value */
short maximum); /*Maximum limit of button's value */
/*Delete a picture button*/
pascal void DeletePictButton (short Button); /*Picture button number */
/*Enable/disable a picture button*/
pascal void EnablePictButton (short Button, /*Picture button number */
Boolean EnabledFlag); /*Enable the picture button? */
/*Select/deselect a picture button*/
pascal void SelectPictButton (short Button, /*Picture button number */
Boolean SelectedFlag); /*Select the picture button? */
/*Get a picture button's minimum setting*/
pascal short GetPictButtonMin (short Button /*Picture button number */
); /* = Picture button's minimum setting */
/*Set a picture button's minimum setting*/
pascal void SetPictButtonMin (short Button, /*Picture button number */
short minimum); /*Picture button's minimum setting */
/*Get a picture button's maximum setting*/
pascal short GetPictButtonMax (short Button /*Picture button number */
); /* = Picture button's maximum setting */
/*Set a picture button's maximum setting*/
pascal void SetPictButtonMax (short Button, /*Picture button number */
short maximum); /* = Picture button's maximum setting */
/*Get a picture button's current value*/
pascal short GetPictButtonVal (short Button /*Picture button number */
); /* = Picture button's current value */
/*Set a picture button's current value*/
pascal void SetPictButtonVal (short Button, /*Picture button number */
short value); /*Picture button's value */
/*Set a picture button's current value, and simultaneously select/deselect it*/
pascal void SetPictButtonValSelect (short Button, /*Picture button number */
short value, /*Picture button's value */
Boolean SelectedFlag); /*Select the picture button? */
/*Set a picture button's value acceleration 'automatic value changing'*/
pascal void SetPictButtonAccel (short Button, /*Picture button number */
short Rate); /*0 = Linear, 1-3 = Slow to fast acceleration */
/*Set a picture button's speed for 'automatic value changing'*/
pascal void SetPictButtonSpeed (short Button, /*Picture button number */
short Rate); /*Rate of change (value increment per second) */
/*Determine if a picture button is enabled*/
pascal Boolean PictButtonIsEnabled (short Button /*Picture button number */
); /* = Is the button enabled? */
/*Determine if a picture button is selected*/
pascal Boolean PictButtonIsSelected (short Button /*Picture button number */
); /* = Is the button selected? */
/*"Flash" a picture button as though it were pressed by the user*/
pascal void FlashPictButton (short Button); /*Picture button number */
/*=========================================== S C R O L L B A R S =========================================== */
/*Create a new scroll bar*/
pascal void NewScrollBar (short ScrollBar, /*Scroll bar number */
short left, /*Scroll bar's co-ordinates (local) */
short top, /* */
short right, /* */
short bottom, /* */
Boolean EnabledFlag, /*Enable the scroll bar? */
short minimum, /*Minimum, current, and maximum value */
short value, /* */
short maximum); /* */
/*Create a new scroll bar (co-ordinates specified as a 'rect') */
pascal void NewScrollBarRect (short ScrollBar, /*Scroll bar number */
const Rect *Bounds, /*Scroll bar's co-ordinates (local) */
Boolean EnabledFlag, /*Enable the scroll bar? */
short minimum, /*Minimum, current, and maximum value */
short value, /* */
short maximum); /* */
/*Delete a scroll bar*/
pascal void DeleteScrollBar (short ScrollBar); /*Scroll bar number */
/*Enable/disable a scroll bar*/
pascal void EnableScrollBar (short ScrollBar, /*Scroll bar number */
Boolean EnabledFlag); /*Enable the scroll bar? */
/*Get a scroll bar's minimum setting*/
pascal short GetScrollBarMin (short ScrollBar /*Scroll bar number */
); /*Scroll bar's minimum setting */
/*Set a scroll bar's minimum setting*/
pascal void SetScrollBarMin (short ScrollBar, /*Scroll bar number */
short minimum); /*Scroll bar's minimum setting */
/*Get a scroll bar's maximum setting*/
pascal short GetScrollBarMax (short ScrollBar /*Scroll bar number */
); /* = Scroll bar's maximum setting */
/*Set a scroll bar's maximum setting*/
pascal void SetScrollBarMax (short ScrollBar, /*Scroll bar number */
short maximum); /*Scroll bar's maximum setting */
/*Get a scroll bar's current value*/
pascal short GetScrollBarVal (short ScrollBar /*Scroll bar number */
); /* = Scroll bar's current value */
/*Set a scroll bar's current value*/
pascal void SetScrollBarVal (short ScrollBar, /*Scroll bar number */
short value); /*Scroll bar's current value */
/*======================================== E D I T I N G F I E L D S ======================================== */
/*Allocate heap storage for a Pascal string, and initialize it.*/
pascal StringHandle NewStrHandle (short StringLen /*Size of string being allocated (1-255 chars) */
); /*Handle to allocated string */
/*Create a new field*/
pascal void NewField (short Field, /*Field number */
short left, /*Field's viewing area co-ordinates (local) */
short top, /* */
short right, /* */
short bottom, /* */
Handle hStr, /*Handle to edit field's text */
short teType, /*Type: box around field and/or CR allowed? */
short Just); /*Justification: left, centre, right */
/*Create a new field (co-ordinates specified as a 'rect') */
pascal void NewFieldRect (short Field, /*Field number */
const Rect *Bounds, /*Field's viewing area co-ordinates (local) */
Handle hStr, /*Handle to edit field's text */
short teType, /*Type: box around field and/or CR allowed? */
short Just); /*Justification: left, centre, right */
/*Delete a field*/
pascal void DeleteField (short Field); /*Field number */
/*Activate a field*/
pascal void ActivateField (short Field, /*Field number */
short Selection); /*Text selection: all, start, end */
/*Deactivate the active field*/
pascal void DeactivateField(void);
/*Process a mouse click in an inactive field. The click has been detected by the PollSystem routine.*/
pascal void ClickInField(void);
/*Get the active field's edited text*/
pascal void GetFieldString (Str255 EditString); /*Field's edited text */
/*Save the active field's edited text in the field's string*/
pascal void SaveFieldString(void);
/*Determine the active field number*/
pascal short ActiveFieldNumber(void); /*Active field number */
/*Determine if a field is empty*/
pascal Boolean FieldIsEmpty (short Field /*Field number */
); /* = Is the specified field empty? */
/*Turn string length limiting on/off for each new field created starting now*/
pascal void FieldLengthLimit (Boolean Limits); /*Should newly created fields be length-limited?*/
/*Offset a field*/
pascal void OffsetField (short Field, /*Field number */
short dh, short dv); /*Number of pixels to be offset (horiz/vert) */
/*Paste text into a field*/
pascal void PasteIntoField (short Field, /*Field number */
Str255 Text, /*Text which is to be pasted */
Boolean Replace); /*Replace all existing text in field? */
/*============================================ L I S T B O X E S ============================================ */
/*Create a new List Box*/
pascal void NewListBox (short ListBox, /*List box number */
short left, /*List box co-ordinates (local) */
short top, /* */
short right, /* */
short bottom, /* */
SignedByte BoxType); /*Type of responses to mouse clicks, shift- */
/* click, dragging, etc. */
/*Create a new List Box (co-ordinates specified as a 'rect') */
pascal void NewListBoxRect (short ListBox, /*List box number */
const Rect *Bounds, /*List box co-ordinates (local) */
SignedByte BoxType); /*Type of responses to mouse clicks, shift- */
/* click, dragging, etc. */
/*Delete a List Box*/
pascal void DeleteListBox (short ListBox); /*List box number */
/*Set a line of text in a List Box*/
pascal void SetListBoxText (short ListBox, /*List box number */
short LineNum, /*Line number */
Str255 Text); /*Text of specified line number */
/*Get a line of text from a List Box*/
pascal void GetListBoxText (short ListBox, /*List box number */
short LineNum, /*Line number */
Str255 Text); /*Text of specified line number */
/*Get a List Box's line number whose text is greater than or equal to the specified string*/
pascal short SearchListBox (short ListBox, /*List box number */
Str255 Text /*Text being compared */
); /* = Line number of text */
/*Select/deselect a specified List Box line*/
pascal void SetListBoxLine (short ListBox, /*List box number */
short LineNum, /*Line number */
Boolean SetIt); /*Selects the line? */
/*Determine if a specific List Box line is selected*/
pascal Boolean GetListBoxLine (short ListBox, /*List box number */
short LineNum /*Line number */
); /* = Is the line selected? */
/*Get the line number of a selected line in a List Box, starting at LineNum and searching down*/
pascal short GetListBoxLines (short ListBox, /*List box number */
short LineNum /*Line number */
); /* = Next selected line */
/*Insert a blank line into a List Box*/
pascal void InsertListBoxLine (short ListBox, /*List box number */
short LineNum); /*Line number */
/*Delete a line from a List Box*/
pascal void DeleteListBoxLine (short ListBox, /*List box number */
short LineNum); /*Line number */
/*Turn a List Box's text drawing on/off*/
pascal void DrawListBox (short ListBox, /*List box number */
Boolean DrawIt); /*Draw the list box's text? */
/*================================================= M E N U S ================================================= */
/*Create the "Apple" menu*/
pascal void AppleMenu (Str255 AboutName); /*Optional "About…" name */
/*Create a menu name, add/change a menu item, or rename an existing menu item*/
pascal void Menu (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
Boolean EnabledFlag, /*Enable the menu? */
Str255 MenuText); /*Menu title or item name */
/*Attach a hierarchical menu to a menu item, or detach a hierarchical menu*/
pascal void AttachMenu (short MenuNumber, /*Menu number to which the submenu is attached */
short ItemNumber, /*Item number to which the submenu is attached */
short SubMenuNumber); /*Hierarchical menu number being attached */
/*Insert a menu item*/
pascal void InsertMenuitem (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number where insertion is to be made */
Boolean EnabledFlag, /*Enable the menu? */
Str255 MenuText); /*Item name */
/*Remove an entire menu and its associated items, or a menu item*/
pascal void RemoveMenu (short MenuNumber, /*Menu number */
short ItemNumber); /*Item number within the menu (0=entire menu) */
/*Display the menu bar after making changes through the Menu or RemoveMenu procedure*/
pascal void UpdateMenuBar(void);
/*Get a menu item's text*/
pascal void GetMenuString (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
Str255 MenuText); /*Menu item's name */
/*Change the name of a menu item*/
pascal void RenameItem (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
Str255 MenuText); /*Menu item's name */
/*Enable/disable a menu or menu item*/
pascal void EnableMenu (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu (or 0) */
Boolean EnabledFlag); /*Enable the menu or item? */
/*Display/remove a menu item's check mark*/
pascal void CheckMenu (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
Boolean checked); /*Place check mark beside the menu item? */
/*Mark a menu item with a specified character (√ or •, etc)*/
pascal void MenuMark (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
char markChar); /*Menu item's character */
/*Get a menu item's ‘mark’ character (√ or •, etc) which is optionally displayed at the item's left side*/
pascal void GetMenuMark (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
char *markChar); /*Menu item's character */
/*Specify a keyboard equivalent for a menu item*/
pascal void MenuCmd (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
char cmdChar); /*Menu item's keyboard-equivalent character */
/*Get a keyboard equivalent for a menu item*/
pascal void GetMenuCmd (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
char *cmdChar); /*Menu item's keyboard-equivalent character */
/*Specify an icon to be displayed by a menu item*/
pascal void MenuIcon (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
short IconSelector); /*IconSelector + 256 = cicn or ICON ID */
/*Get the specifier for the icon that is displayed by a menu item*/
pascal void GetMenuIcon (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
short *IconSelector); /*IconSelector + 256 = cicn or ICON ID */
/*Set the character style for a menu item*/
pascal void MenuStyle (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
Style theStyle); /*Menu item's character style */
/*Determine the number of items in a menu*/
pascal short MenuItemCount (short MenuNumber /*Menu number */
); /* =Number of items in the menu */
/*Determine a menu's parent menu number*/
pascal void GetParentMenu (short *MenuNumber, /*Parent menu's menu number */
short *ItemNumber, /*Parent menu's item number */
short SubMenuNumber); /*Menu number whose parent menu is determined */
/*Determine a menu item's submenu number*/
pascal void GetSubMenu (short MenuNumber, /*Menu number */
short ItemNumber, /*Item number within the menu */
short *SubMenuNumber); /*Menu number of this item's submenu */
/*Highlight a menu in the menu bar, or turn off menu bar highlights*/
pascal void MenuHilite (short MenuNumber); /*Menu number */
/*========================================== P O P - U P M E N U S ========================================== */
/*Create a new Pop-Up menu*/
pascal void NewPopUp (short MenuNumber, /*Pop-Up Menu number */
short left, /*Enclosing rectangle co-ordinates (local) */
short top, /* */
short right, /* */
short bottom, /* */
Str255 MenuTitle, /*Title */
short procID, /*Appearance and behavior specifications */
Boolean EnabledFlag); /*"Menu is enabled" flag */
/*Create a new Pop-Up menu (co-ordinates specified as a 'rect') */
pascal void NewPopUpRect (short MenuNumber, /*Pop-Up Menu number */
const Rect *Bounds, /*Enclosing rectangle co-ordinates (local) */
Str255 Title, /*Title */
short procID, /*Appearance and behavior specifications */
Boolean EnabledFlag); /*"Menu is enabled" flag */
/*Add or change a Pop-Up menu item, or rename an existing menu item*/
pascal void PopUpMenu (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
Boolean EnabledFlag, /*Enable the menu? */
Str255 MenuText); /*Item name */
/*Insert a Pop-Up menu item in the "current" window*/
pascal void InsertPopUpItem (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number where insertion is to be made */
Boolean EnabledFlag, /*Is menu item enabled? */
Str255 MenuText); /*Item name */
/*Remove an Pop-Up menu, or a Pop-Up menu item*/
pascal void RemovePopUp (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber); /*Item number within the menu (0=entire menu) */
/*Get an Pop-Up Menu item's text*/
pascal void GetPopUpString (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
Str255 MenuText); /*Menu item's name */
/*Change the name of a Pop-Up Menu item*/
pascal void RenamePopUp (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
Str255 MenuText); /*Menu item's name */
/*Enable/disable a Pop-Up Menu or menu item*/
pascal void EnablePopUp (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu (or 0) */
Boolean EnabledFlag); /*Enable the menu or item? */
/*Determine if a Pop-Up Menu is enabled*/
pascal Boolean PopUpIsEnabled (short MenuNumber /*Pop-Up Menu number */
); /* = Is the menu enabled? */
/*Display/remove a Pop-Up Menu item's check mark*/
pascal void CheckPopUp (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
Boolean checked); /*Place check mark beside the menu item? */
/*Mark a Pop-Up Menu item with a specified character (√ or •, etc)*/
pascal void PopUpMark (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
char markChar); /*Menu item's character */
/*Get a Pop-Up Menu item's ‘mark’ character (√ or •, etc) which is optionally displayed at the item's left side*/
pascal void GetPopUpMark (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
char *markChar); /*Menu item's character */
/*Specify an icon to be displayed by a Pop-Up Menu item*/
pascal void PopUpIcon (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
short IconSelector); /*IconSelector + 256 = cicn or ICON ID */
/*Get the specifier for the icon that is displayed by a Pop-Up Menu item*/
pascal void GetPopUpIcon (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
short *IconSelector); /*IconSelector + 256 = cicn or ICON ID */
/*Set the character style for a Pop-Up Menu item*/
pascal void PopUpStyle (short MenuNumber, /*Pop-Up Menu number */
short ItemNumber, /*Item number within the menu */
Style theStyle); /*Menu item's character style */
/*Determine the number of items in a Pop-Up Menu*/
pascal short PopUpItemCount (short MenuNumber /*Pop-Up Menu number */
); /* = Number of items in the menu */
/*Determine the selected item in a Pop-Up Menu*/
pascal short GetPopUpSelection (short MenuNumber /*Pop-Up Menu number */
); /*Selected item in the menu */
/*=============================================== C U R S O R S =============================================== */
/*Change the cursor shape*/
pascal void CursorShape (short CursorType); /*Cursor type */
/*Reset the cursor to its appropriate shape depending on its location in the active window.*/
pascal void ResetCursor(void);
/*Create a new Cursor Table*/
pascal void NewCursorTable (short CursorTable, /*Cursor table number */
short CursorType); /*Cursor type */
/*Delete a Cursor Table*/
pascal void DeleteCursorTable (short CursorTable); /*Cursor table number */
/*Add a new Cursor Zone to a Cursor Table, or replace an existing Cursor Zone*/
pascal void CursorZone (short CursorTable, /*Cursor table number */
short CursorZone, /*Cursor zone number */
short CursorType, /*Cursor type */
short left, /*Cursor zone's co-ordinates (local) */
short top, /* */
short right, /* */
short bottom); /* */
/*Add a new Cursor Zone to a Cursor Table, or replace an existing Cursor Zone (co-ordinates specified as a 'rect') */
pascal void CursorZoneRect (short CursorTable, /*Cursor table number */
short CursorZone, /*Cursor zone number */
short CursorType, /*Cursor type */
const Rect *Bounds); /*Cursor zone's co-ordinates (local) */
/*Add a new Cursor Zone to a Cursor Table, or replace an existing Cursor Zone (co-ordinates specified as a 'region') */
pascal void CursorZoneRgn (short CursorTable, /*Cursor table number */
short CursorZone, /*Cursor zone number */
short CursorType, /*Cursor type */
RgnHandle ZoneRgn); /*Cursor zone's region (local) */
/*Indicate that the cursor shape may have to be recalculated due to manually altering Cursor Zone regions. */
pascal void ChangedCursorZone(void);
/*Delete a Cursor Zone*/
pascal void DeleteCursorZone (short CursorTable, /*Cursor table number */
short CursorZone); /*Cursor zone number */
/*Get the co-ordinates of a specified Cursor Zone*/
pascal void GetCursorZone (short CursorTable, /*Cursor table number */
short CursorZone, /*Cursor zone number */
Rect *Bounds); /*Cursor zone's co-ordinates (local) */
/*Get a Cursor Zone's region*/
pascal RgnHandle GetCursorZoneRgn (short CursorTable, /*Cursor table number */
short CursorZone /*Cursor zone number */
); /* = Handle to Cursor region (local) */
/*Make the current window use a specified Cursor Table*/
pascal void UseCursorTable (short CursorTable); /*Cursor table number */
/*Find the cursor zone that contains a specified point*/
pascal short FindCursorZone (Point thePoint /*Location in window's local co-ordinates */
); /* = Cursor zone number containing the point */
/*Enable/disable clicks on push-buttons when the watchCursor is displayed*/
pascal void WatchCursorButtons (Boolean Allowed); /*Can push-buttons be clicked when the */
/* watchCursor is displayed? */
/*=============================================== P O L L I N G =============================================== */
/*Tools Plus polling procedure*/
pascal Boolean PollSystem (TPPollRecord *Poll /*Polling record */
); /* = Did an event occurred? */
/*Set the number of ticks (1/60 sec) your application can wait until it receives a doNothing event.*/
pascal void SetNullTime (long ForegroundTime, /*Duration when application is active */
long BackgroundTime); /*Duration when application is suspended */
/*Determine if "waiting for doNothing events" (timed doNothing events) is supported.*/
pascal Boolean WaitAvail(void); /*Is waiting between doNothing events supported?*/
/*Determine if the application is 'suspended' (ie: this is not the active application)*/
pascal Boolean ApplicationSuspended(void); /*Is the application suspended? */
/*Clear the mouse's current click or drag (ie: discontinue the process, clear the event*/
pascal void ResetMouseClicks(void);
/*========================================= C O L O R D R A W I N G ========================================= */
/*Determine if the Macintosh has color QuickDraw*/
pascal Boolean HasColorQuickDraw(void); /*Does the Mac have color QuickDraw */
/*Determine the number of logical screens (distinct screen depth and color/gray settings)*/
pascal short NumberOfScreens(void); /*Number of logical screens available */
/*Begin updating the specified logical screen*/
pascal void BeginUpdateScreen (short TheScreen); /*Logical screen number */
/*End updating the most recent logical screen*/
pascal void EndUpdateScreen(void);
/*Determine the logical screen's depth*/
pascal short ScreenDepth(void); /*Screen depth in bits */
/*Determine if the logical screen is set to display in color*/
pascal Boolean ScreenHasColors(void); /*Is the screen set to display in color? */
/*Color equivalent to 'PenNormal' routine*/
pascal void PenColorNormal(void);
/*Color equivalent to 'GetPenState' routine*/
pascal void GetColorPenState (ColorPenState *ThePenState);
/*Color equivalent to 'SetPenState' routine*/
pascal void SetColorPenState (ColorPenState *ThePenState);
/*===================================== U S E R N O T I F I C A T I O N ==================================== */
/*Define the settings for notifying the user.*/
pascal void SetNotification (short IconID, /*'SICN' icon ID displayed during notification */
short SoundID, /*Sound ID that is played at notification */
Str255 Message, /*Message displayed during notification */
Boolean ResetAfterUse); /*Revert settings to defaults after notification*/
/*If this application is inactive, inform user that this application needs attention.*/
pascal Boolean PostNotification(void); /*Was the user notified? */
/*========================================= M I S C E L L A N E O U S ========================================= */
/*Determine the System file version*/
pascal double SystemVersion(void); /*System file version (eg 7.0.1 seen as 7.01) */
/*Draw an icon (ICON, ICN#, icl8, icl4, and cicn)*/
pascal void DrawIcon (short theIcon, /*Icon ID number */
short left, /*Icon's top-left corner (local) */
short top, /* */
Boolean EnabledFlag, /*Enable the icon? */
Boolean SelectedFlag); /*Select the icon? */
/*Specify the default appearance for disabled icons*/
pascal void DefaultIconLook (short IconSpec); /*Appearance specifications */
/*Draw a standard Macintosh progress thermometer*/
pascal void DrawThermometer (const Rect *DisplayRect, /*Thermometer's co-ordinates (local) */
long Value, /*Current value */
long Maximum); /*Maximum value (progress = Value ÷ Maximum) */
/*Display a dynamic Alert Box and return the use's action*/
pascal short AlertBox (short theIcon, /*Icon ID number */
Str255 AlertText, /*Alert's text */
long AlertCode /*Button setup codes */
); /* = Button clicked by user */
/*Change a button name for the next use of the dynamic Alert Box*/
pascal void AlertButtonName (short Button, /*Button number from 1 to 9 */
Str255 Title); /*Button's title */
/*Draw "zoom" lines (expanding/collapsing rectangle)*/
pascal void ZoomLines (const Rect *OldRect, /*Starting rectangle (global co-ordinates) */
const Rect *NewRect, /*Ending rectangle (global co-ordinates) */
short Zoom); /*Zoom across, in, or out */
/*Play the System Error sound*/
pascal void Beep(void);
/*Wait for a specified duration*/
pascal void Wait (long ClockTicks); /*Number of ticks (1/60th sec) to wait */
/*Determine the minimum value of 2 numbers*/
pascal long min (long Val1, long Val2);
/*Determine the maximum value of 2 numbers*/
pascal long max (long Val1, long Val2);
#ifdef __cplusplus
}
#endif
#endif /* __ToolsPlus__ */